<template >
      <div class="block text-center">
    <el-carousel height="400px">
        <el-carousel-item v-for="(banner, index) in banners" :key="index">
            <img :src="banner.imageUrl" class="banner-img" />
        </el-carousel-item>
    </el-carousel>
  </div>
    <div class="three-column-container">
    <div class="column">
      <h3>活动 1</h3>
      <p>篮球大战炒鸡好玩</p >
      <img src="D:\图片\R-C (2).jfif" alt="1">
      <button class="buttondd">点击报名</button>
      <p></p>
    </div>
    <div class="column">
      <h3>活动 2</h3>
      <p>羽毛球大比拼，，百人大赛</p >
      <img src="D:\图片\R-C (1).jfif" alt="2">
      <button class="buttondd">点击报名</button>
    </div>
    <div class="column">
      <h3>活动 3</h3>
      <p>乒乓球混合双打，打包各路高手</p >
      <img src="D:\图片\R-C (3).jfif" alt="3">
      <button class="buttondd">点击报名</button>
    </div>
  </div>

</template>

<script setup lang='ts'>
import { ref } from "vue";

const banners = ref([
  { imageUrl: "https://picsum.photos/1200/400?random=1" },
  { imageUrl: "https://picsum.photos/1200/400?random=2" },
  { imageUrl: "https://picsum.photos/1200/400?random=3" },
]);


</script>

<style scoped>
.demonstration {
  color: var(--el-text-color-secondary);
}

.el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

.three-column-container {
  display: flex;
  justify-content: space-between;
  gap: 20px; /* 列间距 */
  margin: 30px 0;
}

.column {
  flex: 1; /* 等分宽度 */
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.column:hover {
  transform: translateY(-5px);
}

.column img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin-top: 15px;
}

@media (max-width: 768px) {
  .three-column-container {
    flex-direction: column;
  }
  .column {
    margin-bottom: 20px;
  }
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



.stat-card {
  display: flex;
  align-items: center;
}
.stat-content {
  margin-left: 16px;
}
.stat-content h3 {
  margin: 0;
  font-size: 20px;
}
.stat-content p {
  margin: 0;
  color: #666;
}
.buttondd{
  height: 30px;
            width: 100px;
            border: 2px solid green;
            font-family: 隶书;
            font-size: 20px;
            color:rgb(235, 132, 132);
            border-radius: 8px;
}
</style>